package seata.storage.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import seata.storage.service.StorageService;

@RestController
@RequiredArgsConstructor
public class StorageController {
	final StorageService storageService;

	@RequestMapping(value = "/deduct", produces = "application/json")
	public Boolean deduct(String commodityCode, Integer count) {
		storageService.deduct(commodityCode, count);
		return true;
	}
}